<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>

<style type="text/css">
@CHARSET "UTF-8";

a {
	color: #c75f3e;
}

#mytable {
	width: 1140px;
	padding: 0;
	margin: 0;
}

caption {
	padding: 0 0 5px 0;
	width: 800px;
	/* font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; */
	text-align: right;
}

th {
	font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
	color: #4f6b72;
	border-right: 1px solid #C1DAD7;
	border-bottom: 1px solid #C1DAD7;
	border-top: 1px solid #C1DAD7;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-align: left;
	padding: 6px 6px 6px 12px;
	background: #CAE8EA url(images/bg_header.jpg) no-repeat;
}

td {
	border-bottom: 1px solid #C1DAD7;
	background: #fff;
	font-size: 11px;
	padding: 6px 6px 6px 12px;
	color: #4f6b72;
}

td.alt {
	background: #F5FAFA;
	color: #797268;
}

th.spec {
	border-left: 1px solid #C1DAD7;
	border-top: 0;
	background: #fff url(images/bullet1.gif) no-repeat;
	font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}

th.specalt {
	border-left: 1px solid #C1DAD7;
	border-top: 0;
	background: #f5fafa url(images/bullet2.gif) no-repeat;
	font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
	color: #797268;
}


</style>
<body>
	<h2>错词库（目前只支持2个中文的错词）：</h2>
	<div style="background-color: #808080;border: 1px;width: 300px">	
		<c:forEach items="${verbalAssociation }" var="map">
			&nbsp;&nbsp;${map.key }&nbsp;&nbsp;&nbsp;&nbsp;==>&nbsp;&nbsp;&nbsp;&nbsp;${map.value }</br>
		</c:forEach>
	</div><br>
	<h2>菜品名首单词出现了不该出现的词：</h2>
	<div style="background-color: #808080;border: 1px;width: 300px">	
		<c:forEach items="${firstCut }" var="value">
			&nbsp;&nbsp;${value }</br>
		</c:forEach>
	</div><br>
	<a href="${path }/ocr-util/verbalAss/goSddVerbaAssociation">有错误词？  去纠正，让解析更智能！</a><br>
	<a href="${path }/ocr-util/verbalAss/goSddVerbaAssociation">菜品名首单词出现了不该出现的词？  去干掉！</a>
	
	
	
	<form name="serForm" action="${path }/ocr-util/ocr/imgParser" method="post"
		enctype="multipart/form-data">
		<h1>图片文字解析</h1>
		<input type="file" name="file"> <input type="submit"
			value="upload" />
	</form>
	<form name="serForm" action="${path }/ocr-util/ocr/cutImgParser" method="post"
		enctype="multipart/form-data">
		<h1>图片文字解析--返回json array</h1>
		<input type="file" name="file"> <input type="submit"
			value="upload" />
	</form>
	<form name="serForm" action="${path }/ocr-util/ocr/getProdct" method="post"
		enctype="multipart/form-data">
		<h1>图片文字解析（对半切再解析）</h1>
		<input type="file" name="file"> <input type="submit"
			value="upload" />
	</form>
	
	<br>
		<c:if test="${pass == true}">
			
			<%-- 上传的图片<br>
			<img dir="${imgVis }">
			解析的内容
			<h3> --%>
			
			</h3>
			<h3>识别到的结果：</h3>
			<div style="background-color: #808080;border: 1px;">	
				<font>${result }</font>
			</div>
			<br><br>
			
			<h3>优化后的结果：</h3>
			<table width="800" border="1" cellspacing="0">
				<tr><th> 菜品名</th><th>菜品价格(元)</th></tr>
				<c:forEach items="${productMap }" var="map">
				<tr>
					<td>${map.key }</td>
					<td>
					<c:choose>
						<c:when test="${map.value == null}">
							<font color="red">${map.key }</font>菜品价格丢失或者是分类
						</c:when>
						<c:otherwise>${map.value }</c:otherwise>
					</c:choose>
					</td>
				</tr>
				</c:forEach>
			</table>
		</c:if>
	


	<!-- <form name="Form2" action="/fileUpload2" method="post"
		enctype="multipart/form-data">
		<h1>采用multipart提供的file.transfer方法上传文件</h1>
		<input type="file" name="file"> <input type="submit"
			value="upload" />
	</form>

	<form name="Form2" action="/springUpload3" method="post"
		enctype="multipart/form-data">
		<h1>使用spring mvc提供的类的方法上传文件</h1>
		<input type="file" name="file"> <input type="submit"
			value="upload" />
	</form> -->
</body>
</html>